package com.hnevc.foodchoice;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import java.util.ArrayList;


public class MainActivity extends AppCompatActivity {

    private ArrayList<Food> foodArrayList;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        initData();
    }

    private void initData() {
        foodArrayList = new ArrayList<>();
        Food food = new Food(1, "桂林米粉", R.mipmap.guilin, "hot|vegetable"
                , 5, "桂林米粉描述");
        foodArrayList.add(food);
        food = new Food(2, "麻辣香锅", R.mipmap.malaxiangguo, "hot|meat"
                , 40, "麻辣香锅描述");
        foodArrayList.add(food);
        food = new Food(3, "水煮鱼", R.mipmap.malaxiangguo, "hot|meat"
                , 48, "水煮鱼描述");
        foodArrayList.add(food);
        food = new Food(4, "清蒸鲈鱼", R.mipmap.malaxiangguo, "meat"
                , 60, "清蒸鲈鱼描述");
        foodArrayList.add(food);
    }

    class Food {
        public int id;
        public String dishName;
        public int dishPic;
        public String type; //类型
        public int price; //价格
        public String dish_desc;

        public Food(int id, String dishName, int dishPic, String type, int price, String dish_desc) {
            this.id = id;
            this.dishName = dishName;
            this.dishPic = dishPic;
            this.type = type;
            this.price = price;
            this.dish_desc = dish_desc;
        }
    }
}
